package xian.woniuxy.web.handler;


import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import xian.woniuxy.utils.ResultVO;

@ControllerAdvice
public class MyExceptionHandler {

    @ExceptionHandler(Exception.class)
    @ResponseBody
    public ResultVO f1(Exception e){
        e.printStackTrace();
        ResultVO resultVO = new ResultVO(500, e.toString(), null);
        return resultVO;
    }


}
